﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RenChangYou.Common;

namespace DaoYou.Web.Controller
{
    public partial class Footer : System.Web.UI.UserControl
    {
        protected List<string> HotCityList{ get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (DataCache.GetCache("HotCity") != null)
            {
                this.HotCityList = (List<string>)DataCache.GetCache("HotCity");
            }
            else
            {
                RenChangYou.BLL.DY_ViewPoint bll = new RenChangYou.BLL.DY_ViewPoint();
                List<string> list = bll.GetModelList(string.Empty).Select(c => c.Province).Distinct().ToList();
                this.HotCityList = list;
                DataCache.SetCache("HotCity", list);
            }
        }
    }
}